package com.itheima.common.exception;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class ExceptionIntercept {

    @ExceptionHandler(NullPointerException.class)
    public void interceptNullPointerException(NullPointerException ne, Model model){
        System.out.println("拦截到了");
    }
}
